var vm = new Vue({
    //vue对象节点,指向父盒子
    el:'#log',                                                                   
    //vue实例 的data属性
    data:function(){
        return{
        	tableData:[],
        	//分页条
  	      	pageSize:10,
  	      	currPage:1,
  	      	total:1
        };
    },
    //vue实例 的methods
    methods:{
       handleSizeChange:function(val) {
    	   vm.pageSize = val;
    	   vm.loadData();
       },
       handleCurrentChange:function(val) {
    	   vm.currPage = val;
    	   vm.loadData();
       },
       //格式化日期
       dateFormat:function(row,column){
    	   var date = row[column.property];
    	   if(date == undefined){
    		   return "";
    	   }
    	   return moment(date).format("YYYY-MM-DD HH:mm:ss");
       },
       loadData:function(){
    	   var url = "./listLoggerByPage.action";
    	   var params = {
    		   "pagemap.page":vm.currPage,
    		   "pagemap.size":vm.pageSize
    	   }
    	   pb.ajaxPost(url,params,function(r){
    		    if(r.code == '000000'){
	       			vm.tableData = r.myLoggers;
	       			vm.total = r.loggercount;
	       		}else{
               		pb.alertErr("加载失败");
               	}
	       },function(err){
	    	   pb.alertErr("加载失败");
	       });
       },
       open(tid){
    	   window.parent.vm.goTo('viewTopic',tid);
       }
    }
    //vue实例 的methods结束
});
vm.loadData();